package learnjava.concur.chapter123;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.locks.LockSupport;

public class TestPark {
    public static void main(String[] args) throws InterruptedException {
        Logger logger = LoggerFactory.getLogger(TestPark.class);
        Class c = TestPark.class;

        Thread t1 = new Thread(()->{
            logger.info("t1 park");
            LockSupport.park();
            logger.info("t1 unpark");
        },"t1");
        t1.start();
        Thread.sleep(1000);
        t1.interrupt();
    }
}
